package com.msh.platform.elm.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "oper_log", schema = "mscm_dev", catalog = "")
public class OperLog {
    private String id;
    private String operType;
    private Integer operObj;
    private String operDetail;
    private Integer operId;
    private Integer createTime;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "OPER_TYPE")
    public String getOperType() {
        return operType;
    }

    public void setOperType(String operType) {
        this.operType = operType;
    }

    @Basic
    @Column(name = "oper_obj")
    public Integer getOperObj() {
        return operObj;
    }

    public void setOperObj(Integer operObj) {
        this.operObj = operObj;
    }

    @Basic
    @Column(name = "oper_detail")
    public String getOperDetail() {
        return operDetail;
    }

    public void setOperDetail(String operDetail) {
        this.operDetail = operDetail;
    }

    @Basic
    @Column(name = "oper_id")
    public Integer getOperId() {
        return operId;
    }

    public void setOperId(Integer operId) {
        this.operId = operId;
    }

    @Basic
    @Column(name = "create_time")
    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OperLog operLog = (OperLog) o;
        return Objects.equals(id, operLog.id) &&
                Objects.equals(operType, operLog.operType) &&
                Objects.equals(operObj, operLog.operObj) &&
                Objects.equals(operDetail, operLog.operDetail) &&
                Objects.equals(operId, operLog.operId) &&
                Objects.equals(createTime, operLog.createTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, operType, operObj, operDetail, operId, createTime);
    }
}
